package bugtracking

/**
 * Created by IntelliJ IDEA.
 * User: alexandrua
 * Date: 6/8/11
 * Time: 5:22 PM
 * To change this template use File | Settings | File Templates.
 */
class History {

    static belongsTo = [Bug, Actor]
    static hasMany = [entries:ModificationEntry]
    Actor who
    Bug bug
    Date bug_when

    static constraints = {
        who(nullable:true)
        bug_when(nullable: false)
    }

    public History mergeHistory(){
        who = who.mergeActor();
//        for(ModificationEntry entry: entries){
//            entry.history = this;
//            entry.save();
//        }
        return this;
    }
}
